package tree;

/**
 * Main Driver for testbench
 * 
 * @author Axel Sundbom, Johannes Sj�lund, Tim Danielsson
 */
public class Main {

	// void streamTest () {
	// FileOutputStream fs = null;
	// try {
	// fs = new FileOutputStream("some_new.csv");
	// TestBench fileBench = new TestBench(fs);
	// fileBench.testLookupComplexity();
	// } catch (IOException e) {
	// System.err.println(e);
	// } finally {
	// try {
	// if (fs != null) {
	// fs.flush();
	// fs.close();
	// }
	// } catch (IOException f) {
	// System.err.println(f);
	// }
	// }
	// }

	public static void main(String[] args) {
		// Run tests
		TestBench testBench = new TestBench();
		testBench.testLookupComplexityOnWordLength();
		testBench.testLookupComplexity();
		testBench.testInsertionComplexity();

		// Display some tree graphically
		BinaryTree bt = new BinaryTree();
		testBench.regularTest(bt);
		/*
		RandomWordFactory words = new RandomWordFactory(10, 3, 5);
		words.initializeRandoms();
		for (String s : words.words) {
			bt.insert(s, s + "Transl");
		}*/
		TestGUI.displayTree(bt);

	}
}
